<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateRecordMinerTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('record_miner', function (Blueprint $table) {

            $table->increments('id');
            $table->timestamp('add_time')->default(DB::raw('CURRENT_TIMESTAMP'))->comment('添加时间');
            $table->string('add_day',100)->nullable()->comment('哪一天');
            $table->integer('mining_capacity')->default(0)->comment('当日挖矿总容量 ');
            $table->integer('capacity')->default(0)->comment('当日审核通过容量');
            $table->decimal('mining')->default(0)->comment('当日挖矿总收益 （矿机钱包）');
            $table->decimal('withdraw_num')->default(0)->comment('当日的总提现（FIL）');
            $table->decimal('withdraw_fil')->default(0)->comment('当日提现条数(FIL) ');
            $table->decimal('performance')->default(0)->comment('当天的销售业绩');
            $table->decimal('wait_withdraw')->default(0)->comment('当天总的待提现');
            //srt
            $table->decimal('srt_customer_owned',20,12)->default(0)->comment('客户当日持币数');
            $table->decimal('srt_recycle',20,12)->default(0)->comment('回收总数');

            $table->engine = 'InnoDB';
            $table->charset = 'utf8';
            $table->collation = 'utf8_unicode_ci';

        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
//        Schema::table('user', function (Blueprint $table) {
//            //
//        });
    }
}
